/**
 * 
 */
package com.peycash.servicio.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.peycash.dominio.Domicilios;
import com.peycash.persistencia.PersistenciaException;
import com.peycash.persistencia.dao.DomicilioDAO;
import com.peycash.servicio.DomicilioServicio;
import com.peycash.servicio.ServicioException;

/**
 * @author JAMARO
 *
 */
@Service
public class DomicilioServicioImpl implements DomicilioServicio {

	@Autowired
	private DomicilioDAO daoDomicilio;

	@Override
	@Transactional
	public long save(Domicilios d) throws ServicioException{
		try{
			long id = daoDomicilio.save(d);
			return id;
		}catch(PersistenciaException e){
			throw new ServicioException("Error en xx:"+e.getMessage(), e);
		}
	}
	
}
